import { axios } from '@/utils/request'

const api = {
  psFile: '/psing/file'
}

export function getPsFileList (parameter) {
  return axios({
    url: api.psFile + '/list',
    method: 'get',
    params: parameter
  })
}

export function savePsFile (parameter) {
  return axios({
    url: api.psFile + (parameter.fileId > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delPsFile (parameter) {
  return axios({
    url: api.psFile + '/remove',
    method: 'post',
    params: parameter
  })
}

export const psFileExport = api.psFile + '/export'
